<div class="layui-form-item" pane="">
    <label class="layui-form-label">{$value['desc']}</label>
    <div class="layui-input-block {$value['class']}" style="{$value['style']}">
        {php}$a=0;{/php}
        {foreach $value['option'] as $key=>$va}
        {if $value['keytostr']}
        {if $value['value']}
        {if in_array($key,$value['value'])}
        {if $a%4==3}
        <input type="checkbox" name="{$value['name']}[]" lay-skin="primary" value="{$key}" title="{$va}" checked=""><br>
        {else}
        <input type="checkbox" name="{$value['name']}[]" lay-skin="primary" value="{$key}" title="{$va}" checked="">
        {/if}
        {else}
        {if $a%4==3}
        <input type="checkbox" name="{$value['name']}[]" lay-skin="primary" value="{$key}" title="{$va}"><br>
        {else}
        <input type="checkbox" name="{$value['name']}[]" lay-skin="primary" value="{$key}" title="{$va}">
        {/if}

        {/if}
        {else}
        {if $a%4==3}
        <input type="checkbox" name="{$value['name']}[]" lay-skin="primary" value="{$key}" title="{$va}"><br>
        {else}
        <input type="checkbox" name="{$value['name']}[]" lay-skin="primary" value="{$key}" title="{$va}">
        {/if}

        {/if}
        {else}
        {if $value['value']}
        {if in_array($va,$value['value'])}
        {if $a%4==3}
        <input type="checkbox" name="{$value['name']}[]" lay-skin="primary" value="{$va}" title="{$va}" checked=""><br>
        {else}
        <input type="checkbox" name="{$value['name']}[]" lay-skin="primary" value="{$va}" title="{$va}" checked="">
        {/if}

        {else}
        {if $a%4==3}
        <input type="checkbox" name="{$value['name']}[]" lay-skin="primary" value="{$va}" title="{$va}"><br>
        {else}
        <input type="checkbox" name="{$value['name']}[]" lay-skin="primary" value="{$va}" title="{$va}">
        {/if}

        {/if}
        {else}
        {if $a%4==3}
        <input type="checkbox" name="{$value['name']}[]" lay-skin="primary" value="{$va}" title="{$va}"><br>
        {else}
        <input type="checkbox" name="{$value['name']}[]" lay-skin="primary" value="{$va}" title="{$va}">
        {/if}

        {/if}
        {/if}
        {php}$a++;{/php}
        {/foreach}
    </div>
</div>